#include "game.h"
#include <iostream>

using namespace::std;

game::game()
{

}

void game::play(graphics *graphs)
{
    Perso link;
    mapHandler map;
    cerr << "interact" << endl;
    interact interact;

    bool done = false;

    // program main loop
    while (!done)
    {
        // events processing
        cerr << "interact" << endl;
        done = interact.gameActions(&link);

        // DRAWING STARTS HERE Soon there will be a graphics thread
        cerr << "mapupdate" << endl;
        map.update(graphs);
        link.Update(graphs);
        // DRAWING ENDS HERE

        graphs->refresh();
        SDL_Delay(30);

    } // end main loop
}
